package testservice;

import com.domain.bean.sys.SysMenu;
import com.pachong.service.SysMenuService;
import com.wy.dao.sys.SysRoleDAO;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author : wangyu
 * Date: 2018-01-29
 * Time: 17:02
 */
public class SysMenuServiceTest extends BaseTest {
    @Autowired
    private SysMenuService sysMenuService;
    @Autowired
    private SysRoleDAO sysRoleDAO;

    @Test
    @Transactional
    public void test1(){
       SysMenu sm = new SysMenu();
        List<SysMenu> sysMenus2 = sysMenuService.selectList(sm);

        System.err.println("----");

    }

    @Test
    public void test2(){
        SysMenu sysMenu1 = new SysMenu();
        sysMenu1.setName("二级目录2");
        sysMenu1.setUrl("2_");
        sysMenu1.setOrderNum(1);
        sysMenu1.setIcon("222");
        sysMenu1.setPermission("role:update");
        sysMenu1.setMenuType(new Byte("2"));
        sysMenuService.save(sysMenu1);
    }

}
